program PI;

{$APPTYPE CONSOLE}

var
  i, n, n0: integer;
  x, y: real;
  fout: textFile;

begin
  assignFile(fout, 'output.txt');
  rewrite(fout);
  n0:=0;
  n:=0;
  for i:=0 to 10000000 do
  begin
    x:=2*random;
    y:=2*random;
    if ((x-1)*(x-1)+(y-1)*(y-1)<=1.0) then
      n0:=n0+1;
    n:=n+1;
    if ((n mod 1000000) = 0) then
    begin
      writeln(fout,((4*n0)/n):0:5);
    end;
  end;
  close(fout);
end.
